home *** CD-ROM | disk | FTP | other *** search
- PROTECT
-
- Changes the protection bits of a file or directory.
-
- Format
-
- PROTECT [FILE] <file | pattern> [FLAGS][+ | -] [<flags>] [ADD | SUB] [ALL]
- [QUIET]
-
- Template
-
- FILE/A,FLAGS,ADD/S,SUB/S,ALL/S,QUIET/S
-
- Location
-
- C:
-
- All files and directories have a series of protection bits (attributes)
- stored with them that control their properties. These bits can be altered to
- indicate the type of file and the operations permitted. PROTECT is used to
- set or clear the protection bits. For directories, only the d bit is
- significant.
-
- The protection bits are represented by letters:
-
- s
-
- The file is a script.
-
- p
-
- The file is a pure command and can be made resident.
-
- a
-
- The file has been archived.
-
- r
-
- The file can be read.
-
- w
-
- The file can be written to (altered).
-
- e
-
- The file is executable (a program).
-
- d
-
- The file or directory can be deleted. (Files within a delete-protected
- directory can still be deleted.)
-
- Use the LIST command to see the protection bits associated with a file. The
- protection field is displayed with set (on) bits shown by their letters and
- clear (off) bits shown by hyphens. For example, a file that is readable,
- writable, and deletable has ----rw-d in the protection field.
-
- To specify the entire protection field at the same time, enter the letters of
- the bits you want set as the FLAGS argument without any other keywords. The
- named bits are set and all the others are cleared.
-
- The symbols + and - (or the equivalent keywords ADD and SUB) are used to
- control specific bits without affecting the state of unspecified bits. Follow
- + or - with the letters of the bits to set or clear, respectively, and only
- those bits are changed. There is no space after the symbol or between the
- letters. The order of the letters does not matter. ADD and SUB work
- similarly, but there must be a space between the keyword and the letters. You
- cannot both set and clear bits in the same command.
-
- The ALL options adds or removes the specified protection bits from all the
- files and subdirectories matching the pattern entered. The QUIET option
- suppresses the screen output.
-
- Example 1:
-
- 1> PROTECT DF0:Memo +rw
-
- sets only the protection bits r (readable) and w (writable) of the file Memo
- on DF0:. No other protection bits are changed.
-
- Example 2:
-
- 1> PROTECT L:#? e SUB
-
- clears the e (executable) protection bit from all the files in the L:
- directory.
-
- Example 3:
-
- 1> PROTECT Work:Paint rwed
-
- The protection status of Paint becomes "----rwed".
-